#pragma once
#include "Hashtable.h"
using namespace Su;

namespace Su
{
	template<class K>
	class unordered_set
	{
	public:
		struct Setofkey
		{
			const K& operator()(const K& key)
			{
				return key;
			}
		};

		typedef typename HashTable<K, K, Setofkey>::const_iterator iterator;
		typedef typename HashTable<K, K, Setofkey>::const_iterator const_iterator;
		bool insert(const K& key)
		{
			return _ht.insert(key).second;
		}
		bool print()
		{
			return _ht.print();
		}
		iterator begin()  
		{
			return _ht.begin();
		}
		iterator end() 
		{
			return _ht.end();
		}
		const_iterator begin() const
		{
			return _ht.begin();
		}
		const_iterator end() const
		{
			return _ht.end();
		}
	private:
		HashTable<K, K, Setofkey> _ht;
	};
}
